import axios from 'axios'
const service = axios.create({
  baseURL: import.meta.env.VITE_BASE_API
})
// 响应拦截器
service.interceptors.response.use((response) => {
  const { success, message, data } = response.data
  return data
  // if (success) {
  //   return data
  // } else {
  //   return Promise.reject(new Error(message))
  // }
})
export default service
